home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
HYP
/
E-G
/
educationstacks.sea
/
Circuits
/
card_5151.txt
< prev
next >
Wrap
Text File
|
1989-02-26
|
8KB
|
339 lines
-- card: 5151 from stack: in
-- bmap block id: 5737
-- flags: 4000
-- background id: 2693
-- name:
----- HyperTalk script -----
on calculate
get char 1 of card field "EMF"
if it="+" then
delete char 1 of card field "EMF"
end if
put card field "EMF" into E
get char 1 of card field "R1"
if it="+" then
delete char 1 of card field "R1"
end if
put card field "R1" into R1
put abs(R1) into R1
put R1 into card field "R1"
get char 1 of card field "R2"
if it="+" then
delete char 1 of card field "R2"
end if
put card field "R2" into R2
put abs(R2) into R2
put R2 into card field "R2"
if E=0 then
send zeroall
exit calculate
end if
if R1=0 and R2=0 then
put "zap" into card field "A1"
put "zap" into card field "A2"
put "zap" into card field "A3"
put E into card field "V1"
exit calculate
end if
if R1=0 then
put "zap" into card field "A1"
put "zap" into card field "A3"
put 0 into card field "A2"
put E into card field "V1"
exit calculate
end if
if R2=0 then
put "zap" into card field "A2"
put "zap" into card field "A3"
put 0 into card field "A1"
put E into card field "V1"
exit calculate
end if
put E/R1 into I1
put E/R2 into I2
put I1+I2 into I3
set numberFormat to "0.000"
put E*1 into card field "V1"
put I1 into card field "A1"
put I2 into card field "A2"
put I3 into card field "A3"
end calculate
on closeField
set hilite of card button "S1 closed" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 open" to true
send zeroall
end closeField
on zeroall
put 0 into card field "V1"
put 0 into card field "A1"
put 0 into card field "A2"
put 0 into card field "A3"
end zeroall
-- part 1 (field)
-- low flags: 01
-- high flags: 0002
-- rect: left=158 top=257 right=272 bottom=214
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 128
-- text size: 10
-- style flags: 256
-- line height: 13
-- part name: A3
-- part 2 (field)
-- low flags: 01
-- high flags: 0002
-- rect: left=141 top=158 right=173 bottom=206
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 128
-- text size: 10
-- style flags: 256
-- line height: 13
-- part name: V1
-- part 3 (field)
-- low flags: 01
-- high flags: 0002
-- rect: left=269 top=197 right=212 bottom=325
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 128
-- text size: 10
-- style flags: 256
-- line height: 13
-- part name: A1
-- part 4 (field)
-- low flags: 01
-- high flags: 0002
-- rect: left=396 top=197 right=212 bottom=452
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 128
-- text size: 10
-- style flags: 256
-- line height: 13
-- part name: A2
-- part 5 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=2 top=90 right=117 bottom=64
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 18
-- style flags: 256
-- line height: 24
-- part name: EMF
-- part 6 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=164 top=96 right=123 bottom=226
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 18
-- style flags: 256
-- line height: 24
-- part name: R1
-- part 7 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=291 top=96 right=123 bottom=353
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 18
-- style flags: 256
-- line height: 24
-- part name: R2
-- part 8 (button)
-- low flags: 00
-- high flags: 4001
-- rect: left=81 top=199 right=219 bottom=93
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: S1 closed
----- HyperTalk script -----
on mouseUp
get hilite of card button "S1 closed"
if it=true then
set hilite of card button "S1 closed" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 open" to true
send zeroall
else
set hilite of card button "S1 open" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 closed" to true
send calculate
end if
end mouseUp
-- part 9 (button)
-- low flags: 00
-- high flags: 0001
-- rect: left=70 top=199 right=219 bottom=82
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: S1 middle
----- HyperTalk script -----
on mouseUp
get hilite of card button "S1 closed"
if it=true then
set hilite of card button "S1 closed" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 open" to true
send zeroall
else
set hilite of card button "S1 open" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 closed" to true
send calculate
end if
end mouseUp
-- part 10 (button)
-- low flags: 00
-- high flags: 0001
-- rect: left=59 top=199 right=219 bottom=71
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: S1 open
----- HyperTalk script -----
on mouseUp
get hilite of card button "S1 closed"
if it=true then
set hilite of card button "S1 closed" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 open" to true
send zeroall
else
set hilite of card button "S1 open" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 closed" to true
send calculate
end if
end mouseUp
-- part 12 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=94 top=200 right=219 bottom=137
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Switch
----- HyperTalk script -----
on mouseUp
get hilite of card button "S1 closed"
if it=true then
set hilite of card button "S1 closed" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 open" to true
send zeroall
else
set hilite of card button "S1 open" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 closed" to true
send calculate
end if
end mouseUp
-- part contents for background part 8
----- text -----
C3. Parallel
-- part contents for card part 2
----- text -----
10.000
-- part contents for card part 3
----- text -----
2.500
-- part contents for card part 4
----- text -----
1.250
-- part contents for card part 1
----- text -----
3.750
-- part contents for card part 5
----- text -----
10
-- part contents for card part 6
----- text -----
4
-- part contents for card part 7
----- text -----
8